// 字体图标 url
const cssCdnUrlList: Array<string> = ['/alifont/iconfont.css']

// 动态批量设置字体图标
export function setCssCdn() {
  if (cssCdnUrlList.length <= 0) return false
  cssCdnUrlList.map((v) => {
    const link = document.createElement('link')
    link.rel = 'stylesheet'
    link.href = v
    link.crossOrigin = 'anonymous'
    document.getElementsByTagName('head')[0].appendChild(link)
  })
}

/**
 * 批量设置字体图标
 * @method cssCdn 动态批量设置字体图标
 */
const setIntroduction = {
  // 设置css
  cssCdn: () => {
    setCssCdn()
  }
}

// 导出函数方法
export default setIntroduction
